﻿using MediatR;
using System.ComponentModel.DataAnnotations;
using ThreeTeams.ErrorCode;

namespace ThreeTeams.API.Application.Command.ProductCommand
{
    public class UpdateProductCommand:IRequest<ApiResult<int>>
    {
        public int Id { get; set; }
        /// <summary>
        /// 团队ID
        /// </summary>
        public int TeamId { get; set; }

        /// <summary>
        /// 类别ID
        /// </summary>
        public int CategoryId { get; set; }

        /// <summary>
        /// 产品类型ID
        /// </summary>
        public int ProductTypeId { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [Required]
        [StringLength(200)]
        public string ProductName { get; set; } = string.Empty;

        /// <summary>
        /// SKU编码
        /// </summary>
        [Required]
        [StringLength(50)]
        public string SKU { get; set; } = string.Empty;

        /// <summary>
        /// 规格
        /// </summary>
        [StringLength(100)]
        public string? Specification { get; set; }

        /// <summary>
        /// 入库价格(分)
        /// </summary>
        public long PurchasePrice { get; set; }

        /// <summary>
        /// 出库价格(分)
        /// </summary>
        public long SellingPrice { get; set; }

        /// <summary>
        /// 库存预警数量
        /// </summary>
        public int StockAlert { get; set; }

        /// <summary>
        /// 重量(克)
        /// </summary>
        public int Weight { get; set; }

        /// <summary>
        /// 品牌
        /// </summary>
        [StringLength(100)]
        public string? Brand { get; set; }

        /// <summary>
        /// 型号
        /// </summary>
        [StringLength(100)]
        public string? Model { get; set; }

        /// <summary>
        /// 英文名称
        /// </summary>
        [StringLength(200)]
        public string? EnglishName { get; set; }

        /// <summary>
        /// 海关编码
        /// </summary>
        [StringLength(50)]
        public string? CustomsCode { get; set; }

        /// <summary>
        /// 申报价格(分)
        /// </summary>
        public long DeclaredPrice { get; set; }

        /// <summary>
        /// 长度(毫米)
        /// </summary>
        public int Length { get; set; }

        /// <summary>
        /// 宽度(毫米)
        /// </summary>
        public int Width { get; set; }

        /// <summary>
        /// 高度(毫米)
        /// </summary>
        public int Height { get; set; }

        /// <summary>
        /// 状态 1-启用 0-禁用
        /// </summary>
        public int Status { get; set; } = 1;

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string? Notes { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        public string Photo { get; set; } = string.Empty;
    }
}
